<script setup lang="ts">
	import { ref, onMounted } from "vue";
	import { formRules } from "./utils/rule";
	import { FormProps } from "./utils/types";
	import ReCol from "@/components/ReCol";
  import { baseUrlApi, baseOaApi } from "@/api/utils";
  import type { UploadProps } from "element-plus";
  import { message } from "@/utils/message";
  import dayjs from 'dayjs';

	const props = withDefaults(defineProps<FormProps>(), {
		formInline: () => ({
			title: "",
			status: 0,
			Id: 0,
		})
	});
	const ruleFormRef = ref();
	const newFormInline = ref(props.formInline);
	function getRef() {
		return ruleFormRef.value;
	}
	defineExpose({ getRef });
  const projectTypeOptions = [
    {id:1,name: '生产'},
    {id:2,name: '生产实施'},
    {id:3,name: '集成'},
    {id:5,name: '外包'},
    {id:6,name: '贸易'},
  ]
  const budgetIsPendOptions = [
    {id:0,name:'非待定'},
    {id:1,name:'待定'},
  ]
  const isPrivateOptions = [
    {id:0, name: '公开'},
    {id:1,name: '私有'},
  ]

  const actionUrl = baseUrlApi + "/uploadFile/upload";

  const fileList = ref([]);
  const contractList = ref([]);
  const technicalProtocol = ref([])
  const imgUrl = ref("");
  const handleAttachmentSuccess: UploadProps["onSuccess"] = (
    response,
    uploadFile
  ) => {
    // newFormInline.value.attachment.contract = baseOaApi + response.result.path;
    if(fileList.value.length > 0) {
      newFormInline.value.attachment.contract = baseOaApi + fileList.value[0]?.response?.result?.path;
    }
    if(contractList.value.length > 0) {
      newFormInline.value.attachment.contractList = baseOaApi + contractList.value[0]?.response?.result?.path;
    }
    if(technicalProtocol.value.length > 0) {
      newFormInline.value.attachment.technicalProtocol = baseOaApi + technicalProtocol.value[0]?.response?.result?.path;
    }

  };

  const beforeUpload = (file: any) => {
    // 检查文件类型是否为合同文件类型（例如：PDF, DOC, DOCX）
    const isContract = file.name.endsWith('.pdf') || file.name.endsWith('.doc') || file.name.endsWith('.docx');
    if (!isContract) {
      message("文件格式不支持!", {
        type: "error"
      });
      return false; // 不允许上传非合同文件类型
    }
    return true;
  }
  const uploadRef = ref()
  const submitUpload = () => {
    uploadRef.value!.submit()
  }
  const onExceed = (files, uploadFiles) => {
    message("已有文件，请先删除已上传文件!", {
      type: "error"
    });
  }
  const handlePreview = (file) => {
    let link = document.createElement("a"); //定义一个a标签
    link.download = file.name; //下载后的文件名称
    link.href = file.url; //需要生成一个 URL 来实现下载
    link.click(); //模拟在按钮上实现一次鼠标点击
    window.URL.revokeObjectURL(link.href);
  }
  onMounted(()=> {
    if(newFormInline.value.title ==='编辑项目') {
      fileList.value = [{name: newFormInline.value.attachment?.contract, url: newFormInline.value.attachment?.contract}]
      contractList.value = [{name: newFormInline.value.attachment?.contract_list, url: newFormInline.value.attachment?.contract_list}]
      technicalProtocol.value = [{name: newFormInline.value.attachment?.technical_protocol, url: newFormInline.value.attachment?.technical_protocol}]
      newFormInline.value.attachment.contract = newFormInline.value.attachment?.contract;
      newFormInline.value.attachment.contractList = newFormInline.value.attachment?.contract_list;
      newFormInline.value.attachment.technicalProtocol = newFormInline.value.attachment?.technical_protocol;
    }
    if(newFormInline.value.title ==='创建项目'){
      newFormInline.value.projectNo = 'P' + dayjs().format('YYYYMMDDHHmmss')
    }
    newFormInline.value.produceRadio = newFormInline.value.projectFlagType === 4?true:false
  })
  const disabledDate = (time) => {
    if(newFormInline.value.rangeDate && newFormInline.value.rangeDate.length > 0) {
      return time.getTime() < (new Date(newFormInline.value.rangeDate[0])).getTime() - 1*8.64e7 - 1
    }
    // if(newFormInline.value.rangeDate && newFormInline.value.rangeDate.length > 0) {
    //   return time.getTime() > (new Date(newFormInline.value.rangeDate[1])).getTime()
    // }
  };
  const dateChange = (item) => {
    newFormInline.value.rangePlanDate = null
  }
  const calculateWorkingHours = (s, e) => {
    const start = new Date(s);
    const end = new Date(e);
    let count = 0;
    const oneDay = 24 * 60 * 60 * 1000; // hours*minutes*seconds*milliseconds
    for (let i = start; i <= end; i.setTime(i.getTime() + oneDay)) {
      const day = i.getDay();
      if (day !== 0 && day !== 6) { // 0 = Sunday, 6 = Saturday
        count++;
      }
    }
    return count;
  }
  const datePickerChange = (val) => {
    if(val) {
      newFormInline.value.effectDay = calculateWorkingHours(val[0], val[1])
    }
  }
  const numberChange = () => {
    // if(newFormInline.value.qualityRatio && newFormInline.value.advanceRatio && newFormInline.value.consignRatio && newFormInline.value.checkRatio) {
    //   let num =
    //   newFormInline.value.qualityRatio +
    //   newFormInline.value.advanceRatio +
    //   newFormInline.value.consignRatio +
    //   newFormInline.value.checkRatio;
    //   if(num>100) {
    //     message("金额比例已超过100%，请检查金额比例", {
    //       type: "error"
    //     });
    //     return
    //   }
    //   if(num !== 100) {
    //     message("金额比例不足100%，请检查金额比例", {
    //       type: "error"
    //     });
    //   }
    // }

  }
  const noticeTypeSelect = ref([
    {
      name: '站内通知'
    },
    {
      name: '钉钉通知'
    }
  ])
  const getRowClassName = ({row, rowIndex}) => {
    if (rowIndex === 2) { // 假设你要修改第三行（索引为2）
      return 'custom-row-tr';
    }
    return '';
  }
  const seeDetail = (url: string) => {
    window.open(url, '_blank');
  }
</script>

<template>
	<el-form ref="ruleFormRef" :model="newFormInline" :rules="formRules" label-width="auto" scroll-into-view-options :class="newFormInline.title === '创建项目' || newFormInline.title === '编辑项目' ? 'maxHeight' : ''">
    <template v-if="newFormInline.title === '创建项目' || newFormInline.title === '编辑项目'">
      <el-row :gutter="30">
      	<re-col :value="12" :xs="24" :sm="24">
      		<el-form-item label="项目名称" prop="projectName">
      			<el-input v-model="newFormInline.projectName" clearable placeholder="请输入项目名称" />
      		</el-form-item>
      	</re-col>
      	<re-col :value="12" :xs="24" :sm="24">
      		<el-form-item label="项目编号" prop="projectNo">
      			<el-input v-model="newFormInline.projectNo" clearable placeholder="请输入项目编号" />
      		</el-form-item>
      	</re-col>
        <re-col :value="12" :xs="12" :sm="12">
        	<el-form-item label="项目类型" prop="projectType">
            <div class="flex">
              <el-select
                v-model="newFormInline.projectType"
                placeholder="请选择"
                clearable
                class="!w-[120px]"
                :disabled="newFormInline.title ==='编辑项目'"
              >
                <el-option
                  v-for="item in projectTypeOptions"
                  :key="item.id"
                  :label="item.name"
                  :value="item.id"
                />
              </el-select>
              <div v-if="newFormInline.projectType === 3" class="ml-5">
                <el-checkbox v-model="newFormInline.produceRadio" label="无生产" size="default" :disabled="newFormInline.title ==='编辑项目'"/>
              </div>
            </div>

        	</el-form-item>
        </re-col>
        <re-col :value="12" :xs="24" :sm="24">
        	<el-form-item label="是否电控" required>
            <el-radio-group v-model="newFormInline.electControl" :disabled="newFormInline.title ==='编辑项目'">
              <el-radio :value="0">否</el-radio>
              <el-radio :value="1">是</el-radio>
            </el-radio-group>
        	</el-form-item>
        </re-col>
        <re-col :value="12" :xs="24" :sm="24">
          <el-form-item label="货款类型" prop="consignType">
            <el-select
              v-model="newFormInline.consignType"
              placeholder="请选择"
              clearable
              class="!w-full"
              :disabled="newFormInline.title ==='编辑项目'"
            >
              <el-option label="发货款" :value="1" />
              <el-option label="到货款" :value="2" />
            </el-select>
          </el-form-item>
        </re-col>
        <re-col :value="12" :xs="24" :sm="24">
        	<el-form-item :label="newFormInline.consignType === 1?'发货款比例(%)': '到货款比例(%)'" prop="consignRatio">
            <el-input-number
            	v-model="newFormInline.consignRatio"
            	class="!w-full"
            	:min="0"
              :max="100"
            	controls-position="right"
              :precision="0"
              :step="5"
              @change="numberChange"
            />
        	</el-form-item>
        </re-col>
        <re-col :value="12" :xs="24" :sm="24">
          <div class="felx-bc">
            <el-form-item label="预付金额比例(%)" prop="advanceRatio">
              <el-input-number
              	v-model="newFormInline.advanceRatio"
              	class="!w-full"
              	:min="0"
                :max="100"
              	controls-position="right"
                :precision="0"
                :step="5"
                @change="numberChange"
              />

            </el-form-item>
          </div>

        </re-col>

        <re-col :value="12" :xs="24" :sm="24">
        	<el-form-item label="验收金额比例(%)" prop="checkRatio">
            <el-input-number
            	v-model="newFormInline.checkRatio"
            	class="!w-full"
            	:min="0"
              :max="100"
            	controls-position="right"
              :precision="0"
              :step="5"
              @change="numberChange"
            />
        	</el-form-item>
        </re-col>
        <re-col :value="12" :xs="24" :sm="24">
        	<el-form-item label="质保金额比例(%)" prop="qualityRatio">
            <el-input-number
            	v-model="newFormInline.qualityRatio"
            	class="!w-full"
            	:min="0"
              :max="100"
            	controls-position="right"
              :precision="0"
              @change="numberChange"
              :step="5"
            />
        	</el-form-item>
        </re-col>
        <re-col :value="12" :xs="24" :sm="24">
        	<el-form-item label="质保金时长(月)" prop="warrantyPayment">
            <el-input-number
            	v-model="newFormInline.warrantyPayment"
            	class="!w-full"
            	:min="0"
              :max="72"
            	controls-position="right"
              :precision="0"
              :step="5"
            />
        	</el-form-item>
        </re-col>
        <re-col :value="12" :xs="24" :sm="24">
        	<el-form-item label="质保时长(月)" prop="warrantyDuration">
            <el-input-number
            	v-model="newFormInline.warrantyDuration"
            	class="!w-full"
            	:min="0"
              :max="72"
            	controls-position="right"
              :precision="0"
              :step="5"
            />
        	</el-form-item>
        </re-col>
        <re-col :value="12" :xs="24" :sm="24">
        	<el-form-item label="合同金额(元)" prop="amount">
            <el-input-number
            	v-model="newFormInline.amount"
            	class="!w-full"
            	:min="0"
            	controls-position="right"
              :precision="2"
              :step="10000"
            />
        	</el-form-item>
        </re-col>
        <re-col :value="24" :xs="24" :sm="24">
        	<el-form-item label="合同日期" prop="rangeDate">
        		<el-date-picker
              v-model="newFormInline.rangeDate"
              type="daterange"
              range-separator="至"
              start-placeholder="开始时间"
              end-placeholder="结束时间"
              format="YYYY-MM-DD"
              value-format="YYYY-MM-DD"
              @change="dateChange"
            />
        	</el-form-item>
        </re-col>
        <re-col :value="24" :xs="24" :sm="24">
        	<el-form-item label="计划日期" prop="rangePlanDate">
            <!--  -->
        		<el-date-picker
              v-model="newFormInline.rangePlanDate"
              type="daterange"
              range-separator="至"
              start-placeholder="开始时间"
              end-placeholder="结束时间"
              format="YYYY-MM-DD"
              value-format="YYYY-MM-DD"
              :disabled-date="disabledDate"
              @change="datePickerChange"
            />
        	</el-form-item>
        </re-col>
        <re-col :value="12" :xs="12" :sm="12">
          <!-- v-if="newFormInline.title === '编辑项目' && newFormInline.taskList[2].status === 3"
          v-if="newFormInline.title === '编辑项目' && newFormInline.taskList[2].status === 3" -->
        	<el-form-item label="工作日(天)" prop="effectDay">
        		<el-input-number
        			v-model="newFormInline.effectDay"
        			class="!w-full"
        			:min="0"
        			:max="9999"
        			controls-position="right"
              :precision="0"
        		/>
        	</el-form-item>
        </re-col>
        <re-col :value="12" :xs="12" :sm="12">
        	<el-form-item label="销售负责人" prop="principalUserId">
            <el-select
              v-model="newFormInline.principalUserId"
              placeholder="请选择负责人"
              clearable
              filterable
            >
              <el-option
                v-for="item in newFormInline.userSelect"
                :key="item.userId"
                :label="item.name"
                :value="item.userId"
              />
            </el-select>
        	</el-form-item>
        </re-col>
        <re-col :value="24" :xs="24" :sm="24">
        	<el-form-item label="通知方式" prop="noticeType">
            <el-checkbox-group v-model="newFormInline.noticeType">
              <el-checkbox label="station" >站内通知</el-checkbox>
              <el-checkbox label="dingtalk" >钉钉通知</el-checkbox>
            </el-checkbox-group>
        	</el-form-item>
        </re-col>
        <!-- <re-col :value="12" :xs="24" :sm="24">
        	<el-form-item label="预算是否待定" prop="budgetIsPend">
        		<el-select
        		  v-model="newFormInline.budgetIsPend"
        		  placeholder="请选择预算是否待定"
        		  clearable
        		>
        		  <el-option
        		    v-for="item in budgetIsPendOptions"
        		    :key="item.id"
        		    :label="item.name"
        		    :value="item.id"
        		  />
        		</el-select>
        	</el-form-item>
        </re-col> -->
        <!-- <re-col :value="12" :xs="24" :sm="24">
        	<el-form-item label="访问控制" prop="isPrivate">
        		<el-select
        		  v-model="newFormInline.isPrivate"
        		  placeholder="请选择访问控制"
        		  clearable
        		>
        		  <el-option
        		    v-for="item in isPrivateOptions"
        		    :key="item.id"
        		    :label="item.name"
        		    :value="item.id"
        		  />
        		</el-select>
        	</el-form-item>
        </re-col> -->
        <re-col :value="24" :xs="24" :sm="24">
        	<el-form-item label="描述" prop="description">
        		<el-input v-model="newFormInline.description" clearable placeholder="请输入描述" :rows="3" type="textarea"/>
        	</el-form-item>
        </re-col>
        <!-- <re-col :value="12" :xs="24" :sm="24">
        	<el-form-item label="创建任务" prop="createTask">
            <el-checkbox v-model="newFormInline.createTask" label="是" />
        	</el-form-item>
        </re-col> -->
        <re-col :value="24" :xs="24" :sm="24">
        	<el-form-item label="合同" required>
        		<el-upload
              ref="uploadRef"
              :action="actionUrl"
              :on-success="handleAttachmentSuccess"
              :on-exceed="onExceed"
              v-model:file-list="fileList"
              :before-upload="beforeUpload"
              :on-preview="handlePreview"
              :limit="1"
              class="!w-full"
              drag
              multiple>
              <el-button link type="primary" @click="submitUpload">上传附件</el-button>
              <template #tip>
                <div class="el-upload__tip">
                  只能上传合同文件，格式为pdf,doc,docx
                </div>
              </template>
            </el-upload>
        	</el-form-item>
        </re-col>
        <re-col :value="24" :xs="24" :sm="24">
        	<el-form-item label="清单" required>
        		<el-upload
              ref="uploadInventoryRef"
              :action="actionUrl"
              :on-success="handleAttachmentSuccess"
              v-model:file-list="contractList"
              :on-preview="handlePreview"
              :limit="1"
              class="!w-full"
              drag
              multiple>
              <el-button link type="primary" @click="submitUpload">上传附件</el-button>
            </el-upload>
        	</el-form-item>
        </re-col>
        <re-col :value="24" :xs="24" :sm="24">
        	<el-form-item label="技术协议" required>
        		<el-upload
              ref="uploadProtocolRef"
              :action="actionUrl"
              :on-success="handleAttachmentSuccess"
              v-model:file-list="technicalProtocol"
              :on-preview="handlePreview"
              :limit="1"
              class="!w-full"
              drag
              multiple>
              <el-button link type="primary" @click="submitUpload">上传附件</el-button>
            </el-upload>
        	</el-form-item>
        </re-col>
      </el-row>
    </template>
    <template v-if="newFormInline.title === '任务详情'">
      <el-table
        ref="taskListRef"
        border
        :data="newFormInline.taskList"
        class="dialogTable"
        style="width: 100%;padding-bottom: 10px;"
        :header-cell-style="{background: 'var(--el-fill-color-light)', color: 'var(--el-text-color-primary)'}"
        show-overflow-tooltip
        default-expand-all
        row-key="taskId"
        :tree-props="{ children: 'childrens', hasChildren: 'hasChildren' }"
        :row-class-name="getRowClassName"
        >
          <el-table-column label="审核阶段" width="160">
            <template #default="scope">{{ scope.row.taskTypeName ?? '--' }}</template>
          </el-table-column>
          <el-table-column label="状态" width="90">
            <template #default=" { row }">
              <el-tag type="info" v-if="row.status === 0">未开始</el-tag>
              <el-tag type="warning" v-else-if="row.status === 1">进行中</el-tag>
              <el-tag v-else-if="row.status === 2">挂起跳过</el-tag>
              <el-tag type="success" v-else-if="row.status === 3">已完成</el-tag>
              <el-tag type="danger" v-else-if="row.status === 4">已关闭</el-tag>
              <el-tag type="danger" v-else>其他</el-tag>
            </template>
          </el-table-column>
          <el-table-column label="计划日期" min-width="240">
            <template #default="scope">
              {{ scope.row.planStartDate ?? '--' }} 至 {{ scope.row.planEndDate ?? '--' }}
            </template>
          </el-table-column>
          <el-table-column label="实际日期" min-width="240">
            <template #default="scope">
              {{ scope.row.realStartDate ?? '--' }} 至 {{ scope.row.realEndDate ?? '--' }}
            </template>
          </el-table-column>
          <el-table-column label="完成比例(%)" width="110">
            <template #default="scope">{{ scope.row.completeRate ?? '--' }}</template>
          </el-table-column>
          <el-table-column label="预计小时" width="90">
            <template #default="scope">{{ scope.row.expectHour ?? '--' }}</template>
          </el-table-column>
          <el-table-column label="指派给用户" min-width="130">
            <template #default="{row}">
              <div class="assigneds">
                <span v-for="(item, curr) in row.assigneds" :key="curr" class="str">
                  {{item.user?.name}}<span>, </span>
                </span>
              </div>
            </template>
          </el-table-column>
          <el-table-column label="抄送给用户" min-width="130">
            <template #default="{row}">
              <div class="assigneds">
                <span v-for="(item, curr) in row.assignedExtras" :key="curr" class="str">
                  {{item.user?.name}}<span>, </span>
                </span>
                <span v-if="row.assignedExtras && row.assignedExtras.length ===0">--</span>
              </div>
            </template>
          </el-table-column>
      </el-table>
    </template>
    <template v-if="newFormInline.title === '项目详情'">
      <el-descriptions :column="2" border>
        <el-descriptions-item label="项目名称">{{formInline.detail.projectName || '--'}}</el-descriptions-item>
        <el-descriptions-item label="项目编码">{{formInline.detail.projectNo || '--'}}</el-descriptions-item>
        <el-descriptions-item label="任务阶段">{{formInline.detail.taskTypeName || '--'}}</el-descriptions-item>
        <el-descriptions-item label="任务总数">{{formInline.detail.taskCount || '--'}}</el-descriptions-item>
        <el-descriptions-item label="项目类型">{{formInline.detail.projectTypeName || '--'}}</el-descriptions-item>
        <el-descriptions-item label="是否电控">{{formInline.detail.electControl === 0 ? '否' : '是' }}</el-descriptions-item>
        <el-descriptions-item label="交付状态">
          <el-tag type="success" v-if="formInline.detail.isDelive === 1">已交付</el-tag>
          <el-tag type="info" v-else>未交付</el-tag>
        </el-descriptions-item>
        <el-descriptions-item label="货款类型">{{formInline.detail.consignType === 1 ? '发货款' : '到货款' }}</el-descriptions-item>
        <el-descriptions-item :label="newFormInline.consignType === 1?'发货款比例(%)': '到货款比例(%)'">
          {{formInline.detail.consignRatio}}
        </el-descriptions-item>
        <el-descriptions-item label="预付金额比例(%)">
          {{formInline.detail.advanceRatio}}
        </el-descriptions-item>
        <el-descriptions-item label="验收金额比例(%)">
          {{formInline.detail.checkRatio}}
        </el-descriptions-item>
        <el-descriptions-item label="质保金额比例(%)">
          {{formInline.detail.warrantyRatio}}
        </el-descriptions-item>
        <el-descriptions-item label="质保金时长(月)">
          {{formInline.detail.warrantyPayment}}
        </el-descriptions-item>
        <el-descriptions-item label="质保时长(月)">
          {{formInline.detail.warrantyDuration}}
        </el-descriptions-item>
        <el-descriptions-item label="合同金额(元)">
          {{formInline.detail.amount}}
        </el-descriptions-item>

        <el-descriptions-item label="合同日期">
          {{ formInline.detail.startDate??'--' }} 至 {{formInline.detail.endDate??'--'}}
        </el-descriptions-item>
        <el-descriptions-item label="计划日期">
          {{ formInline.detail.planStartDate??'--' }} 至 {{formInline.detail.planEndDate??'--'}}
        </el-descriptions-item>
        <el-descriptions-item label="实际日期">
          <span v-if="formInline.detail.realStartDate">{{ dayjs(formInline.detail.realStartDate).format('YYYY-MM-DD')}}</span>
          <span v-else>--</span>
          <span> 至 </span>
          <span v-if="formInline.detail.realEndDate">{{ dayjs(formInline.detail.realEndDate).format('YYYY-MM-DD')}}</span>
          <span v-else>--</span>
        </el-descriptions-item>
        <el-descriptions-item label="工作日(天)">{{formInline.detail.effectDay ?? '--'}}</el-descriptions-item>
        <el-descriptions-item label="剩余时间(天)">{{formInline.detail.surplusDate ?? '--'}}</el-descriptions-item>

        <el-descriptions-item label="通知方式">
          <span v-for="(item, index) in JSON.parse(formInline.detail.noticeType)" :key="index">
            <span v-if="item === 'station'">站内通知</span>
            <span v-if="item === 'dingtalk'">钉钉通知</span>
          </span>
        </el-descriptions-item>
        <el-descriptions-item label="状态">
          <el-tag type="info" v-if="formInline.detail.status === 0">未开始</el-tag>
          <el-tag type="warning" v-if="formInline.detail.status === 1">进行中</el-tag>
          <el-tag v-if="formInline.detail.status === 2">挂起跳过</el-tag>
          <el-tag type="success" v-if="formInline.detail.status === 3">已完成</el-tag>
          <el-tag type="danger" v-if="formInline.detail.status === 4">已关闭</el-tag>
        </el-descriptions-item>
        <el-descriptions-item label="实收款(%)">{{formInline.detail.realReceiptRatio || '--'}}</el-descriptions-item>
        <el-descriptions-item label="预收款(%)" >
          {{formInline.detail.receiptRatio || '--'}}
        </el-descriptions-item>
        <el-descriptions-item label="描述">{{formInline.detail.description || '--'}}</el-descriptions-item>
        <el-descriptions-item label="合同附件">
          <el-button type="primary" size="small" plain @click="seeDetail(formInline.detail.attachment.contract)">查看</el-button>
        </el-descriptions-item>
        <el-descriptions-item label="合同清单">
          <el-button type="primary" size="small" plain @click="seeDetail(formInline.detail.attachment.contract)">查看</el-button>
        </el-descriptions-item>
        <el-descriptions-item label="技术协议">
          <el-button type="primary" size="small" plain @click="seeDetail(formInline.detail.attachment.contract)">查看</el-button>
        </el-descriptions-item>
        <el-descriptions-item label="销售负责人">{{formInline.detail.principalUser.name ?? '--'}}</el-descriptions-item>
        <el-descriptions-item label="创建人">{{formInline.detail.createUser.name ?? '--'}}</el-descriptions-item>
        <el-descriptions-item label="创建时间">{{formInline.detail.createdAt ?? '--'}}</el-descriptions-item>
        <el-descriptions-item label="更新时间">{{formInline.detail.updatedAt ?? '--'}}</el-descriptions-item>
        <el-descriptions-item label="项目标识">
          <el-tag type="success" v-if="formInline.detail.receiptFull === 1">已结清</el-tag>
          <el-tag type="info" v-else>未结清</el-tag>
        </el-descriptions-item>
      </el-descriptions>
    </template>
	</el-form>
</template>
<style scoped>
	.avatar-uploader .el-upload {
		border: 1px dashed var(--el-border-color);
		border-radius: 6px;
		cursor: pointer;
		position: relative;
		overflow: hidden;
		transition: var(--el-transition-duration-fast);
	}

	.avatar-uploader .el-upload:hover {
		border-color: var(--el-color-primary);
	}

	.el-icon.avatar-uploader-icon {
		font-size: 28px;
		color: #8c939d;
		width: 178px;
		height: 178px;
		text-align: center;
	}
  .maxHeight {
    max-height: 700px;
    overflow-x: hidden;
  }
  .assigneds {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .assigneds .str:last-child span{
    display: none;
  }
  :deep(.dialogTable .el-table__inner-wrapper:before) {
    background-color: var(--el-table-border-color) !important;
  }
  :deep(.el-table .el-table__row--level-1 td:nth-child(1)) {
    border-bottom: none;
  }
  :deep(.el-table .custom-row-tr + .el-table__row--level-1 + .el-table__row--level-1 + .el-table__row--level-1 td:nth-child(1)),
  :deep(.el-table .custom-row-tr + .el-table__row--level-1 + .el-table__row--level-1 + .el-table__row--level-1 + .el-table__row--level-1 + .el-table__row--level-1 + .el-table__row--level-1 td:nth-child(1)){
    border-bottom: 1px solid #ebeef5;
  }
</style>
